﻿@page
@model DetailModel
@{
    ViewBag.Title = Model.Descriptor.Name;
    Layout = "_Modal";
    ViewBag.HideFooter = true;
}

<div class="row">
    <div class="col-12">
        <div class="text-secondary mb-3">
            @Html.Raw(Model.Descriptor.Description)<span>(@Html.Raw(Model.Descriptor.ToIntervalDisplayString())执行)</span>
        </div>
        <b>
            上一次执行：
        </b>
        <div class="text-secondary mb-3">@Model.Descriptor.LastExecuted.ToNormalString()</div>
        <b>下一次执行：</b>
        <div class="text-secondary mb-3">@Model.Descriptor.NextExecuting.ToNormalString()</div>
        @if (Model.Descriptor.TaskArgument.ErrorDate != null)
        {
            <b>
                <i class="bi-exclamation-triangle text-danger"></i> 
                发生错误：@Model.Descriptor.TaskArgument.ErrorDate.ToNormalString()
            </b>
            <div class="text-secondary">
                @Html.Raw(Model.Descriptor.TaskArgument.Error)
            </div>
        }
    </div>
</div>